<?php
/**
 * 周舟 hzboye010@163.com
 * addby sublime snippets
 * 论坛用户禁言 测试类
 */

namespace app\test\controller;

use app\test\controller\Ava;
use app\utils\BoyeService;

class BbsAdminOper extends Ava{
    //用户禁言
    public function banUser(){
        if(IS_AJAX){
            $data = [
						'uid'       => I('post.uid',''),
						'admin_uid' => I('post.admin_uid',''),
						'ban_value' => I('post.ban_value',''),
						'api_ver'     => $this->api_ver,
						'notify_id'   => $this->notify_id,
						'alg'         => $this->alg,
						'type'        => 'BY_BbsAdminOper_banUser',
          ];

          $service = new BoyeService();
          $result = $service->callRemote("",$data,true);
          echo $this->parseResult($result);
        }else{
          $this->assign('type','BY_BbsAdminOper_banUser');
          $this->assign('field',[
            ['api_ver','100',LL('need-mark api version')],
            ['admin_uid',50,LL('need-mark admin user ID')],
            ['uid',47,LL('need-mark user ID')],
            ['ban_value',1,LL('need-mark thread-ban-value')],
          ]);
          echo $this->display('ava/test');
        }
    }

}